package d4_list;

public class moive implements Comparable<moive>{
    @Override
    public int compareTo(moive o) {
        return this.age-o.age;
    }

    // 重写 toString 方法
    @Override
    public String toString() {
        return "Movie{name='" + name + "', score=" + score + ", actor='" + actor + "'"+",age='"+age+"'}";
    }

    private String name;
    private double score;
    private String actor;
    private int age;

    public moive(String name, double score, String actor, int age) {
        this.name = name;
        this.score = score;
        this.actor = actor;
        this.age = age;
    }

    public moive() {
    }

    public String getActor() {
        return actor;
    }

    public void setActor(String actor) {
        this.actor = actor;
    }

    public double getScore() {
        return  score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }


}
